//
//  BigMoto.cpp
//  HelloCpp
//
//  Created by Nguyen Cong Huy on 10/25/14.
//
//

#include "BigMoto.h"

float BigMoto::width = 0.8*METTER_TO_POINT;
float BigMoto::length = 2*METTER_TO_POINT;

BigMoto::BigMoto()
{
    setTag(ID_BIG_MOTO);
}

BigMoto::~BigMoto()
{
}

bool BigMoto::init(){
    Vehicle::init();
    
    mainSprite = CCSprite::createWithSpriteFrameName("BigMoto.png");
    mainSprite->setAnchorPoint(ccp(0, 0));
    addChild(mainSprite);
    
    float realSizeX = length;
    float scaleFactorX = realSizeX/mainSprite->boundingBox().size.width;
    mainSprite->setScaleX(scaleFactorX);
    
    float realSizeY = width;
    float scaleFactorY = realSizeY/mainSprite->boundingBox().size.height;
    mainSprite->setScaleY(scaleFactorY);
    
    setContentSize(mainSprite->boundingBox().size);
    
    return true;
}